import React, { useState, useEffect } from "react";

const List = (props) => {
    return (
        <div>
            <ul>
                {props.list.map((item, index) => {
                    return <li key={index}>{item}</li>;
                })}
            </ul>
        </div>
    );
};

/* export const List = ({ list }) => {
    return (
        <div>
            <ul>
                {list.map((item, index) => {
                    return <li key={index}>{item}</li>;
                })}
            </ul>
        </div>
    );
}; */
export default List;
